﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp5
{
    class Class1
    {
        public void SumUtils1(int a, int b)
        {
            int sum = a + b;
            Console.WriteLine(sum);
        }

        public void SumUtils1(double c, double d)
        {
            double sum = c + d;
            Console.WriteLine(sum);
        }
        public void SumUtils1(string e, string f)
        {
            double q = double.Parse(e);
            double w = double.Parse(f);
            double sum = q + w;
            Console.WriteLine(sum);
        }
        public void SumUtils1(int num)
        {
            int sum = 0;
            for (int i = 1; i <= num; i++)
            {
                sum = sum + i;
            }
            Console.WriteLine("1到指定整数的和为：" + sum);
        }
    }
}
